
{extend name='../../admin/view/table'}
{block name="content"}
<div class="think-box-shadow">
    {include file='member/index_search'}
    <table id="memberTable" data-url="{:sysuri()}" data-target-search="form.form-search"></table>
</div>
{/block}
{block name='script'}
<script>
    $(function () {
        $('#memberTable').layTable({
            even: true, height: 'full',
            sort: {field: 'id'},
            cols: [[
                // {checkbox: true},
                {field: 'id', title: 'ID', width: 80, align: 'center'},
                {
                    field: 'avatar', title: '头像',  align: 'center', templet: function (d) {
                        if (!d.avatar) return '-';
                        return layui.laytpl('<div class="headimg headimg-ss shadow-inset margin-0" data-tips-image data-tips-hover data-lazy-src="{{d.avatar}}"></div>').render(d);
                    }
                },
                {field: 'nickname', title: '昵称'},
                {field: 'mobile', title: '联系手机'},
                {field: 'gender', title: '性别', align: 'center'},
                {field: 'age', title: '年龄', align: 'center'},
                {field: 'devices_count', title: '设备数', align: 'center'},
                {field: 'cats_count', title: '宠物数', align: 'center'},
                {field: 'create_at', title: '注册时间'},
                {toolbar: '#toolbar', title: '操作面板', align: 'center',minWidth: 150, fixed: 'right'}
            ]]
        });
    });

</script>

<script type="text/html" id="toolbar">
    <a data-action='{:url("remove")}' data-value="id#{{d.id}}" data-confirm="确认要删除这条记录吗？" class="layui-btn layui-btn-sm layui-btn-danger">删 除</a>
</script>
{/block}